package com.ssy.lingxi.platform.manage.entity.content;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 分类实体类
 * @author fhj
 * @version 2.0.0
 * @date 2021/04/25
 */
@Data
@Entity
@Table(schema = "public", name = "man_content_category")
public class ContentCategory implements Serializable {
    private static final long serialVersionUID = 6247120481840919270L;
    
    @ApiModelProperty(value = "主键id")
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "content_category_seq")
    @SequenceGenerator(sequenceName = "man_content_category_seq", name = "content_category_seq", allocationSize = 1)
    private Long id;

    @ApiModelProperty(value = "第一级id（冗余字段。给第三级分类使用，第一二级没用。）")
    @Column(columnDefinition = "int8")
    private Long firstId;

    @ApiModelProperty(value = "父id")
    @Column(columnDefinition = "int8")
    private Long parentId;

    @ApiModelProperty(value = "分类名称")
    @Column(columnDefinition = "varchar(10)")
    private String name;

    @ApiModelProperty(value = "分类描述")
    @Column(columnDefinition = "varchar(50)")
    private String describe;

    @ApiModelProperty(value = "是否推荐：0.否；1.是；")
    @Column(columnDefinition = "int2")
    private Integer status;

    @ApiModelProperty(value = "级别")
    @Column(columnDefinition = "int2")
    private Integer level;

    @ApiModelProperty(value = "创建时间")
    @Column(columnDefinition = "int8")
    private Long createTime = System.currentTimeMillis();
}
